// import { User } from '@element-plus/icons-vue/dist/types';
// export namespace 导出（含有子属性的）对象
// * 请求响应参数(不包含data)
export interface Result {
	code: string;
	msg: string;
}

// * 请求响应参数(包含data)
export interface ResultData<T = any> extends Result {
	menuList: any;
	[x: string]: any;
	data: T;
}

// * 分页响应参数
export interface ResPage<T> {
	datalist: T[];
	pageNum: number;
	pageSize: number;
	total: number;
}

export interface Header {
	pageNum: number;
	pageSize: number;
}

// * 分页请求参数
export interface ReqPage {
	pageNum: number;
	pageSize: number;
}

export interface ReqPage2 {
	page: number;
	limit: number;
}

export type DicDeptRlst = {
	label: string;
	value: string;
};

// * 登录模块
export namespace Login {
	export interface ReqLoginForm {
		username: string;
		password: string;
		captcha: string;
		uuid: string;
	}
	export interface ResLogin {
		access_token: string;
	}
	export interface ResAuthButtons {
		[key: string]: {
			[key: string]: boolean;
		};
	}
}

// * 文件上传模块
export namespace Upload {
	export interface ResFileUrl {
		fileUrl: string;
	}
}

// * 用户管理模块
export namespace User {
	export interface ReqGetUserParams extends ReqPage2 {
		username: string;
	}

	export interface SaveUser {
		email: string;
		mobile?: string;
		password: string;
		status?: number;
		username: string;
		createUserId: number;
	}

	export interface ResUserList {
		userId: number;
		admDvs: string;
		createTime: string;
		deptId: string;
		deptIds: string | null;
		deptName: string;
		deptNames: string | null;
		email: string;
		loginErrorNum: number;
		loginTime: string;
		mobile: string | null;
		name: string;
		roleIdList: string | null;
		salt: string;
		status: number;
		username: string;
	}
	export interface ResStatus {
		userLabel: string;
		userValue: number;
	}
	export interface ResGender {
		genderLabel: string;
		genderValue: number;
	}
	export interface ResDepartment {
		id: string;
		name: string;
		children?: ResDepartment[];
	}
}
